package com.yunxi.service.localService.impl.sto;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.sto.StoFrozenReasonMapper;
import com.yunxi.model.sto.StoFrozenReason;
import com.yunxi.service.localService.sto.StoFrozenReasonService;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * <p>
 * 车辆冻结原因 服务实现类
 * </p>
 *
 * @author caoYong
 * @since 2019-05-21
 */
@Service
public class StoFrozenReasonServiceImpl extends ServiceImplPlus<StoFrozenReasonMapper, StoFrozenReason> implements StoFrozenReasonService {

    @Override
    public void delAndReset(List<String> list, Integer isDel,String userId) {
        if(list != null && list.size() > 0){
            for(String id : list){
                StoFrozenReason stoFrozenReason = baseMapper.selectById(id);
                stoFrozenReason.setIsDel(isDel);
                stoFrozenReason.setUpdateBy(userId);
                baseMapper.updateById(stoFrozenReason);
            }
        }
    }

    @Override
    public List reasonList() {
        return baseMapper.reasonList();
    }
}
